package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiT_ads;

//DAO
public interface T_adsMapperBase {

	//根据id查看
    @Select("SELECT * FROM T_ADS  WHERE AID = #{AID}")
	public ApiT_ads findT_adsById(Integer aid);
	
    //查看数据集
    @Select("SELECT * FROM T_ads")
	public List<ApiT_ads> findT_adss();
	
	//添加
    @Insert("INSERT INTO T_ADS (ANAME, ZH_NAME, SPEC, CTYPE, START_DATE, END_DATE, ENABLE, ADMIN, HIT, URL) VALUES (#{ANAME}, #{ZH_NAME}, #{SPEC}, #{CTYPE}, #{START_DATE}, #{END_DATE}, #{ENABLE}, #{ADMIN}, #{HIT}, #{URL})")
 	@Options(useGeneratedKeys = true, keyProperty = "aid")
    public int insertT_ads(ApiT_ads t_ads);
  	
	//修改
    @Update("UPDATE T_ADS SET ANAME = #{ANAME}, ZH_NAME = #{ZH_NAME}, SPEC = #{SPEC}, CTYPE = #{CTYPE}, START_DATE = #{START_DATE}, END_DATE = #{END_DATE}, ENABLE = #{ENABLE}, ADMIN = #{ADMIN}, HIT = #{HIT}, URL = #{URL} WHERE AID = #{AID}")
    public int updateT_ads(ApiT_ads t_ads);
    
    //删除
    @Delete("DELETE FROM T_ADS  WHERE AID = #{AID}")
    public int deleteT_ads(Integer aid);
 
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    
}


